
package com.insigma.business.qrcode.soldier.dao;


import com.insigma.business.qrcode.common.annotation.Crypt;
import com.insigma.business.qrcode.soldier.entity.DataStatsCDO;
import com.insigma.business.qrcode.soldier.entity.SoldierUnemploymentRegistrationInfoDO;
import com.insigma.business.qrcode.soldier.request.SoldierUnemploymentRegistrationInfoBSearcher;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


@Crypt(decryptFields = {"idCardNo", "", ""})
public interface SoldierUnemploymentRegistrationInfoDao {

    
    List<SoldierUnemploymentRegistrationInfoDO> search(final SoldierUnemploymentRegistrationInfoBSearcher innerSearcher);

    
    SoldierUnemploymentRegistrationInfoDO get(final String id);

    
    Integer insert(final SoldierUnemploymentRegistrationInfoDO soldierUnemploymentRegistrationInfoDO);

    
    Integer update(final SoldierUnemploymentRegistrationInfoDO soldierUnemploymentRegistrationInfoDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final String modifierId);

    @Crypt(encryptParamIndex = {0})
    List<SoldierUnemploymentRegistrationInfoDO> getByIdCardNo(String idCardNo);

    List<SoldierUnemploymentRegistrationInfoDO> listAllUnemploymentSolider(SoldierUnemploymentRegistrationInfoBSearcher searcher);

    Integer countByType(String type);

    Integer countByStatus(String status);

    Integer countNotEmployment(String areaLike);

    List<DataStatsCDO> countUnemploymentRegistrationAreaMap(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel, @Param("levelLength") int levelLength);

    List<DataStatsCDO> countUnemploymentRegistrationAgeMap(String areaLike);

    @Crypt(encryptParamIndex = {0})
    List<SoldierUnemploymentRegistrationInfoDO> getByIdCardNoWithDeleted(String idCardNo);

    Integer countNotEmploymentByStatusList(@Param("areaLike") String areaLike, @Param("statusList") List<String> statusList, @Param("startDate") String startDate);

    List<DataStatsCDO> countUnemploymentRegistrationAreaMapByStatus(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel, @Param("levelLength") int levelLength
            , @Param("statusList") List<String> statusList);

    List<SoldierUnemploymentRegistrationInfoDO> listAllAutoEmployment();

    Integer countByTypeAndArea(@Param("type") String type, @Param("adminAreaCode") String adminAreaCode);

    Integer countByStatusAndArea(@Param("status") String status, @Param("adminAreaCode") String adminAreaCode);

    List<DataStatsCDO> groupTypeAreaMap(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel, @Param("levelLength") int levelLength, @Param("type") String type);

    Integer countBySource(@Param("adminAreaCode")String adminAreaCode, @Param("source")String source, @Param("startDate") String startDate);

    Integer countByCreateDatetime(@Param("adminAreaCode")String adminAreaCode, @Param("month")String month);

    List<DataStatsCDO> groupAreaByTime(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel, @Param("levelLength") int levelLength,
                                       @Param("startDate") Date startDate,  @Param("endDate") Date endDate);

    List<Double> listVisitSecondDiff(String adminAreaCode);

    List<DataStatsCDO> groupAreaByTimeAndIsVisited(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel, @Param("levelLength") int levelLength,
                                                   @Param("startDate") Date startDate,  @Param("endDate") Date endDate,  @Param("visited") boolean visited);

    List<DataStatsCDO> groupHistory(@Param("areaLike")String areaLike,@Param("nextLevel") int nextLevel, @Param("levelLength")int levelLength,
                                    @Param("registrationStatusList")List<String> registrationStatusList, @Param("historyStatusList")List<String> historyStatusList);

    Integer countHistory(@Param("adminAreaCode")String adminAreaCode, @Param("historyStatus")String historyStatus);

    Integer countRegistrationHistory(@Param("adminAreaCode") String adminAreaCode, @Param("registrationStatusList")List<String> registrationStatusList,@Param("historyStatusList") List<String> historyStatusList);
}
